//扩展已有类型的方法
fn main() {
    println!("Hello, world!");
    let f = 100f64;
}

trait Float {
    fn f100(&self)->Self;
}

impl Float for f64 {
    fn f100(&self)->Self{
        *self * *self
    }
}